<template>
	<div class="bg">
		<el-table :data="shengeList" style="width: 100%"  max-height="700">
			<el-table-column prop="realname" label="姓名" width="100">
			</el-table-column>
			<el-table-column prop="phone" label="电话号码" width="150">
			</el-table-column>
			<el-table-column prop="store" label="门店名称" width="150">
			</el-table-column>
			<el-table-column prop="address" label="所在地址" width="180">
			</el-table-column>
			<el-table-column prop="detail" label="详细地址" width="250">
			</el-table-column>
			<el-table-column label="资质">
				<template slot-scope="scope">
					<div class="tabBox_img" v-viewer>
						<img v-lazy="scope.row.qualifications" />
					</div>
				</template>
			</el-table-column>
			<el-table-column fixed="right" label="操作" width="300">
				<template slot-scope="scope">
					<el-button @click="handleClick(scope.row.uid)" type="text" size="small">审核通过</el-button>
					<el-button @click="handleClick1(scope.row.uid)" type="text" size="small">审核不通过</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>

</template>

<script>
	import {
		getshenhe,
		butongg,
		tongg
	} from '@/api/user';
	export default {
		data() {
			return {
				shengeList: []
			}
		},
		mounted() {
			this.getshenheFn()
		},
		methods: {
			getshenheFn() {
				console.log(1111111111);
				let that = this;
				getshenhe().then((res) => {
					that.shengeList = res.data
					console.log(res, 'res1111111111111111');
				})
			},
			handleClick(row) {
				tongg({uid:row}).then((res)=>{
					this.getshenheFn()
				})
				console.log(row);
			},
			handleClick1(row) {
				console.log(row);
				butongg({uid:row}).then((res)=>{
					this.getshenheFn()
				})
			}

		}

	}
</script>

<style>
	.bg {
		background-color: #fff;
		padding: 30px;
	}
</style>